require 'rss/2.0.rb'
require 'open-uri'

class RssController < ApplicationController
  def show
    ibnfeed = RssParser.run("http://ibnlive.in.com/xml/rss/Entertainment.xml")
    
    feed1 = ibnfeed[:items][0]
    feed2 = ibnfeed[:items][1]
    feed3 = ibnfeed[:items][2]
    feed4 = ibnfeed[:items][3]
    feed5 = ibnfeed[:items][5]
    
    ndfeed = RssParser.run("http://movies.ndtv.com/rssnews.aspx?cat=Bollywood")
    feed6 = ndfeed[:items][0]
    feed7 = ndfeed[:items][1]
    feed8 = ndfeed[:items][2]
    feed9 = ndfeed[:items][3]
    feed10 = ndfeed[:items][5]
    
    frfeed = RssParser.run("http://fridayrelease.com/rss/new-release-movies.xml")
    feed11 = frfeed[:items][0]
    feed12 = frfeed[:items][1]
    feed13 = frfeed[:items][2]
    feed14 = frfeed[:items][3]
    feed15 = frfeed[:items][5]

    @ibnfeeds = [feed1, feed2, feed3, feed4, feed5]
    @ndfeeds = [feed6, feed7, feed8, feed9, feed10]
    @frfeeds = [feed11, feed12, feed13, feed14, feed15]
    #@feeds = ibnfeeds+ ndfeeds+ frfeeds
    self

  end

end
